<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>关联前台产品分类</title>
</head>
<body>

<div class="layui-fluid">

    <blockquote class="layui-crumb">
        前台产品>产品分类>
        <a lay-href="/serv/showCateg/list.action">服务分类</a>>
        <a th:href="'/serv/showCateg/detail.action?categId='+${servCategory.categId}">[[${servCategory.name == null ? '' : servCategory.name }]]</a>
        >关联产品分类
    </blockquote>

    <div class="layui-card">

        <div th:replace="servcategroy/show/_tab::tab"></div>

        <div class="layui-card-body">
            <form method="post" action="" class="layui-form" lay-filter="zmn-categ-form">

                <div class="layui-card-header" style="margin-top:10px;"><b>选择产品分类，提交后将与服务分类关联，原关联分类自动清理更新。</b></div>
                <div class="layui-split">&nbsp;</div>

                <div class="layui-form-item" th:each="m : ${categOnes}">
                    <label class="layui-form-label">[[${m.name}+'：']]</label>
                    <div class="layui-input-block">
                        <tr th:each="twoCategory : ${map[m.categId]}">
                            <input type="checkbox" name="showPlat" th:value="${twoCategory.categOneId}+','+${twoCategory.categId}" th:title="${twoCategory.categoryName}" th:checked="${twoCategory.related}">
                        </tr>
                    </div>
                </div>
                <!--按钮栏
                        置于form标签内的最下方，
                        主功能按钮使用默认样式，次要功能按钮使用原始按钮(加入样式layui-btn-primary)
                        -->
                <div class="layui-form-item submit">
                    <div class="layui-input-block">
                        <button th:if="${#authPermit.checkPermit('/serv/showCateg/ass/batchAddAssociation.action')}" class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary"
                                onclick="layui.admin.events.closeThisTabs();">取消
                        </button>
                    </div>
                </div>

                <div class="layui-split">&nbsp;</div>
            </form>
        </div>

    </div>

</div>

<script type="text/javascript" th:inline="javascript">
    var json = {
        servCategId: [[${servCategId}]]
    };
    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        art_serv_categ_show_classify: "servcategory/show/zmn.art.serv.categ.classify",
    }).use(['index', 'art_serv_categ_show_classify']);

</script>
</body>
</html>